#pragma once
#include "Headers.h"
#include "ConsoleForm.h"

class MaterialManagerListener: public Ogre::MaterialManager::Listener
{
private:

public:
	MaterialManagerListener()
	{

	}

	~MaterialManagerListener()
	{

	}

	Technique* handleSchemeNotFound(unsigned short schemeIndex, 
									const Ogre::String& schemeName, Material* originalMaterial, unsigned short lodIndex, 
									const Renderable* rend)
	{
		ConsoleForm::Instance->logMessage("handleSchemeNotFound " + originalMaterial->getName());
		return new Technique(originalMaterial);
	}


};

class MaterialListener: public Ogre::Material::Listener
{
private:
	
public:
	MaterialListener()
	{
		
	}

	~MaterialListener()
	{
	
	}

	void backgroundLoadingComplete(Resource* res)
	{
		ConsoleForm::Instance->logMessage("backgroundLoadingComplete" + res->getName());
	}
	
	void backgroundPreparingComplete(Resource*res)
	{
		ConsoleForm::Instance->logMessage("backgroundPreparingComplete" + res->getName());
	}
	
	void loadingComplete(Resource*res)
	{
		ConsoleForm::Instance->logMessage("loadingComplete" + res->getName());
	}
	
	void preparingComplete(Resource*res)
	{
		ConsoleForm::Instance->logMessage("preparingComplete" + res->getName());
	}
	
	void unloadingComplete(Resource*res)
	{
		ConsoleForm::Instance->logMessage("unloadingComplete" + res->getName());
	}
	
};
